import {
	defineStore
} from 'pinia';

export const Usegwo = defineStore('Usegwo', {
	state: () => {
		return {
			Gowu: []
		}
	},
	actions: {
		gowc() {
			let num = 0;
			this.Gowu.forEach(item => {
				if (item.zt) {
					num++
				}
			})
			return num
		}
	},
	persist: {
		//唯一key
		key: 'Usegwo',
		//需要持久化的字段
		paths: ['Gowu'],
	},
})

if (
	import.meta.hot) {
	import.meta.hot.accept(acceptHMRUpdate(useStore,
		import.meta.hot))
}
